package cn.edu.scau.cmi.linpeiwei.simpleFactoryMethod;

import cn.edu.scau.cmi.linpeiwei.domain.AutoInsurance;
import cn.edu.scau.cmi.linpeiwei.domain.BodyInjur;
import cn.edu.scau.cmi.linpeiwei.domain.Collision;
import cn.edu.scau.cmi.linpeiwei.domain.Com;
import cn.edu.scau.cmi.linpeiwei.domain.Other;
import cn.edu.scau.cmi.linpeiwei.domain.PersonInjur;
import cn.edu.scau.cmi.linpeiwei.domain.Property;

public class PolicyProducer {
	public static AutoInsurance getInsurObj(String InsurType) {
		
		switch (InsurType) {
		case "人身伤亡":
			return new BodyInjur();

		case "碰撞":
			return new Collision();
			
		case "驾驶员本身伤亡":
			return new PersonInjur();
			
		case "财产损失":
			return new Property();
			
		case "综合保险":
			return new Com();
			
		default:
			return new Other();
			
		}
	}
}
